﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Jobs/Jobs.master" AutoEventWireup="true" CodeBehind="Applicants.aspx.cs" Inherits="HRdex_Final.Jobs.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div >
  
<asp:GridView ID="gvApplicants" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ApplicantID" DataSourceID="applicants" BackColor="White" 
        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            Width="714px" onrowdatabound="gvApplicants_RowDataBound" 
            onselectedindexchanged="gvApplicants_SelectedIndexChanged" >
    <Columns>
        <asp:ButtonField CommandName="Select" Text="Button" Visible="False" /> 
                
        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" 
            ReadOnly="True" />
        <asp:BoundField DataField="contactNum" HeaderText="Contact No." 
            SortExpression="contactNum" />
        <asp:BoundField DataField="email" HeaderText="Email Address" 
            SortExpression="email" />
        <asp:BoundField DataField="Title" HeaderText="Position" 
            SortExpression="Title" />
        <asp:BoundField DataField="resName" HeaderText="Resume" 
            SortExpression="resName" Visible="True" />
        <asp:BoundField DataField="resume" HeaderText="Resume" 
            SortExpression="resume" Visible="False" />
        <asp:BoundField DataField="resType" HeaderText="resType" 
            SortExpression="resType" Visible="False" />
        <asp:BoundField DataField="ApplicantID" HeaderText="Applicant ID" 
            SortExpression="cApplicantID" Visible="False" />
    </Columns>
    <FooterStyle BackColor="White" ForeColor="#000066" />
    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
    <RowStyle ForeColor="#000066" />
    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
    <SortedAscendingCellStyle BackColor="#F1F1F1" />
    <SortedAscendingHeaderStyle BackColor="#007DBB" />
    <SortedDescendingCellStyle BackColor="#CAC9C9" />
    <SortedDescendingHeaderStyle BackColor="#00547E" />
</asp:GridView>
<br />
<asp:Panel ID="PNapplicant" runat="server">
<table style="font-family: Arial, Helvetica, sans-serif; font-size: medium; font-weight: bold; width: 621px;">
<tr>
    <td>Name:</td>
    <td><asp:Label ID="lblname" runat="server"></asp:Label></td>
</tr>

<tr>
    <td>Contact No.:</td>
    <td><asp:Label ID="lblno" runat="server"></asp:Label></td>
</tr>

<tr>
    <td>Email Address:</td>
    <td><asp:Label ID="lblemail" runat="server"></asp:Label></td>
</tr>

<tr>
    <td>Position Applied:</td>
    <td><asp:Label ID="lblpos" runat="server"></asp:Label></td>
</tr>

<tr>
    <td>Resume:</td>
    <td><asp:Label ID="lblresume" runat="server" />
    <asp:Button ID="btnRsume" runat="server" Text="Download" 
            onclick="btnRsume_Click" /></td>
</tr>
</table>


</asp:Panel>



    <asp:SqlDataSource ID="applicants" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
        
            SelectCommand="SELECT formApplicant.ApplicantID, formApplicant.fName + ' ' + formApplicant.lName AS Name, formApplicant.Address, formApplicant.contactNum, formApplicant.email, catJobTitle.Title, formApplicant.resName, formApplicant.resume, formApplicant.resType FROM formApplicant INNER JOIN catJobTitle ON formApplicant.JobID = catJobTitle.JobID ORDER BY formApplicant.ApplicantID DESC"></asp:SqlDataSource>

</div>
</asp:Content>
